package com.raowb.common.base.entitys;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 实体父类
 */
public abstract class BaseEntity extends BaseIDEntity {

	protected static final long serialVersionUID = 1L;

	/*
	 * 创建时间
	 */
	// @JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
	// @DateTimeFormat(pattern = DateUtil.DATE_TIME_PATTERN)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	protected Date createTime;
	/**
	 * 创建人
	 */
	protected Long createrId;

	/**
	 * 创建人姓名
	 */
	protected String createrName;

	/*
	 * 最后修改时间
	 */
	// @JsonFormat(pattern = DateUtil.DATE_TIME_PATTERN)
	// @DateTimeFormat(pattern = DateUtil.DATE_TIME_PATTERN)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	protected Date updateTime;
	/**
	 * 更新人
	 */
	protected Long updaterId;

	/**
	 * 更新人姓名
	 */
	protected String updaterName;
	

		
	/** 搜索值 */
	@TableField(exist=false)
    private String searchValue;

    /** 请求参数 */
    @TableField(exist=false)
    private Map<String, Object> params;

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Long getCreaterId() {
		return createrId;
	}

	public void setCreaterId(Long createrId) {
		this.createrId = createrId;
	}

	public String getCreaterName() {
		return createrName;
	}

	public void setCreaterName(String createrName) {
		this.createrName = createrName;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Long getUpdaterId() {
		return updaterId;
	}

	public void setUpdaterId(Long updaterId) {
		this.updaterId = updaterId;
	}

	public String getUpdaterName() {
		return updaterName;
	}

	public void setUpdaterName(String updaterName) {
		this.updaterName = updaterName;
	}

	public String getSearchValue() {
		return searchValue;
	}

	public void setSearchValue(String searchValue) {
		this.searchValue = searchValue;
	}

	public Map<String, Object> getParams() {
		if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
	}

	public void setParams(Map<String, Object> params) {
		this.params = params;
	}
	
	

}
